package com.example.video.service;

import com.example.video.entity.Account;
import com.example.video.entity.Video;
import com.example.video.Enum.videoStatus;
import com.example.video.common.Result;
import com.example.video.entity.ResponseData;
import org.springframework.security.core.Authentication;

import java.util.List;

/**
 * @author qiusuyang
 * @since 2024-04-13
 */
public interface IVideoService {

    List<Video> getList(Integer page, Integer size);

    List<Video> getListByAccountId(Integer userId);

    List<Video> getListByRole(String role);

    List<Video> getListByAccountIdAndStatus(Integer page, Integer size, List<Integer> userId, Integer downLoading);

    Video getItem(Integer id);
    boolean save(Video item);


    boolean delete(Integer id);
    boolean addList(ResponseData.Data data, Integer accountId, String next_cursor, Authentication authentication);


    Video getItemByAccountIdAndStatus(Integer accountId, videoStatus status);

    long getCount();

    long getCountByAccountId(Integer accountId);


    Video getItemByResourceIdAndAccountId(String resourceId, Integer accountId);

    List<Video> getListByNotDownLoading();

    List<Video> getListByNotDownLoadingAndAccountIdArr(List<Integer> idList);

    long getCountByAccountIdAndDownLoading(List<Integer> accountIdList, Integer downLoading);

    Result<List<Integer>> status(Account account);

    boolean updateStatusByid(Integer videoId, Integer status);
}
